#include <opencv2/opencv.hpp>
#include <iostream>
using namespace std;
using namespace cv;

int main()
{
	const char *filename = "lena.jpg";
	Mat img=imread(filename, 1);
	Mat gray,hsv, hsvChannels[3];
	cvtColor(img, gray, COLOR_BGR2GRAY);
	imshow("source image", img);
	imshow("gray", gray);

	cvtColor(img, hsv, COLOR_BGR2HSV);
	split(hsv, hsvChannels);
	imshow("Hue", hsvChannels[0]);
	imshow("Saturation", hsvChannels[1]);
	imshow("value", hsvChannels[2]);
	waitKey(0);
	
}
